﻿@model  SuperiorModel.Api_HomeDataModel
@{

    ViewBag.Title = "预览效果";
    Layout = "~/Views/Shared/_Layout.cshtml";
    var spid = Request["spid"];
    var said = Request["said"];
    var menuList = ViewBag.MenuList;
}

<!--顶部搜索-->
<header class='weui-header'>

    <div class="weui-search-bar" id="searchBar">
        <div class="weui_cell_hd"></div>
        <div class="weui-search-bar__form">
            <div class="weui-search-bar__box">
                <i class="weui-icon-search"></i>
                <input style=" background #188dee; z-index 9999;" type="search" class="weui-search-bar__input" id="searchInput" placeholder="搜索您想要的商品" required>
                <a href="javascript:" class="weui-icon-clear" id="searchClear"></a>
            </div>
            <label class="weui-search-bar__label" id="searchText" style="transform-origin: 0px 0px 0px; opacity: 1; transform: scale(1, 1);">
                <i class="weui-icon-search"></i>
                <span>搜索您想要的商品</span>
            </label>
        </div>
        <a href="javascript:" class="weui-search-bar__cancel-btn" id="searchCancel">取消</a>
    </div>
</header>
<!--主体-->
<div class='weui-content' style="padding-top: 46px;">
    <!--顶部轮播-->
    <div class="swiper-container swiper-banner">
        <div class="swiper-wrapper">
            @foreach (var item in Model.Banners)
            {
                <div class="swiper-slide"><a href="javascript:;"><img src="@item.ImgPath" /></a></div>
            }

        </div>
        <div class="swiper-pagination"></div>
    </div>
    <!--图标分类-->
    @if (menuList.Count >= 4)
    {
        <div class="weui-flex wy-iconlist-box">

            @for (int i = 0; i < 4; i++)
            {
                <div class="weui-flex__item"><a href="javascript:void(0);" class="wy-links-iconlist"><div class="img"><img src="@menuList[i].ImgPath"></div><p>@menuList[i].MenuName</p></a></div>
            }
        </div>
    }
    @if (menuList.Count >= 8)
    {
        <div class="weui-flex wy-iconlist-box">

            @for (int i = 4; i < 8; i++)
            {
                <div class="weui-flex__item"><a href="javascript:void(0);" class="wy-links-iconlist"><div class="img"><img src="@menuList[i].ImgPath"></div><p>@menuList[i].MenuName</p></a></div>
            }
        </div>
    }



    <!--热门-->
    <div class="wy-Module">
        <div class="wy-Module-tit-line"><span>热门商品</span></div>
        <div class="wy-Module-con">
            <ul class="wy-pro-list clear">
                @foreach (var item in Model.Hots)
                {
                    <li>
                        <a href="javascript:void(0);">
                            <div class="proimg"><img src="@item.ImgPath"></div>
                            <div class="protxt">
                                <div class="name">@item.ProductName</div>
                                <div class="wy-pro-pri">¥<span>@item.SallPrice</span></div>
                            </div>
                        </a>
                    </li>
                }

            </ul>

        </div>
    </div>


    <!--专场-->
    <div class="wy-Module" id="zc_div" style="display:none">
        <div class="meui-guang">
            <a href=""><img src="" alt="" /></a>


        </div>


    </div>


    <!--猜你喜欢-->
    <div class="wy-Module">
        <div class="wy-Module-tit-line"><span>新品推荐</span></div>
        <div class="wy-Module-con">
            <ul class="wy-pro-list clear">
                @foreach (var item in Model.NewRecommends)
                {
                    <li>
                        <a href="javascript:void(0);">
                            <div class="proimg"><img src="@item.ImgPath"></div>
                            <div class="protxt">
                                <div class="name">@item.ProductName</div>
                                <div class="wy-pro-pri">¥<span>@item.SallPrice</span></div>
                            </div>
                        </a>
                    </li>
                }

            </ul>
            <div class="morelinks">优越店长提供技术支持</div>
        </div>
    </div>
</div>

<!--底部导航-->
<div class="foot-black"></div>
<div class="weui-tabbar wy-foot-menu">
    <a href="javascript:void(0);" class="weui-tabbar__item weui-bar__item--on">
        <div class="weui-tabbar__icon foot-menu-home"></div>
        <p class="weui-tabbar__label">首页</p>
    </a>

    <a href="javascript:void(0);" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-list"></div>
        <p class="weui-tabbar__label">分类</p>
    </a>
    <a href="javascript:void(0);" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-cart"></div>
        <p class="weui-tabbar__label">购物</p>
    </a>
    <a href="javascript:void(0);" class="weui-tabbar__item">
        <div class="weui-tabbar__icon foot-menu-member"></div>
        <p class="weui-tabbar__label">我的</p>
    </a>
</div>
<script src="~/scripts/js/swiper.js"></script>
<script src="~/scripts/PreView/Index.js"></script>
<script>
    IndexClass.Instance.Init();
</script>